package com.chinasoft.goodsManager.servlet;

import com.chinasoft.goodsManager.goodslistserver.impl.ListServiceImpl;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

@WebServlet("/userdelete")
public class UserListDeleteServlet extends HttpServlet {
    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        //删除行
        response.setContentType("text/html;charset=UTF-8");
        //获取id
        String id = request.getParameter("id");
        Integer ids = Integer.valueOf(id);
        ListServiceImpl listService = new ListServiceImpl();
        //调用方法
        listService.userselete(ids);
    }

    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        this.doPost(request, response);
    }
}
